﻿<UserControl x:Class="Swan.SwanWakeUp.Controls.AlarmSetter"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:uc="clr-namespace:Swan.SwanWakeUp.Controls"
             xmlns:util="clr-namespace:Swan.SwanWakeUp.Util"
             mc:Ignorable="d" >

    <Grid Height="Auto">
        <Grid.Resources>
            <util:DateTimeConverter x:Key="DateTimeConverter" />
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="30" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Label Content="Alarm time" Grid.ColumnSpan="2" HorizontalAlignment="Center"  Name="label3" Margin="0" FontSize="18" />
        <Label Grid.Row="1" Content="Hour" HorizontalAlignment="Right"  Margin="0,0,10,0" Height="30" VerticalAlignment="Bottom" />
        <Label Grid.Row="1" Grid.Column="1" Content="Minute"  HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="10,0,0,0" />
        <uc:NumericUpDown Grid.Row="2" Grid.Column="0" x:Name="udHour" MaxValue="23" MinValue="0" Value="{Binding StartTime, Mode=TwoWay, Converter={StaticResource DateTimeConverter}, ConverterParameter='h'}"  Height="26" Width="50" HorizontalAlignment="Right" Margin="0,0,10,0" />
        <uc:NumericUpDown Grid.Row="2" Grid.Column="1" x:Name="udMinute" MinValue="0" MaxValue="59" Value="{Binding StartTime, Mode=TwoWay, Converter={StaticResource DateTimeConverter}, ConverterParameter='m'}"  HorizontalAlignment="Left" Height="26" Width="50" Margin="10,0,0,0" />
        <!--<numeric:NumericUpDown Name="udHour" Height="26" Width="50" ValueChanged="NumericUpDown_ValueChanged" Margin="25,51,103,113" ShowButtons="True" SnapsToDevicePixels="False" Step="1" MaxValue="23" MinValue="0"></numeric:NumericUpDown>
        <numeric:NumericUpDown Name="udMinute" Height="26" Width="50" ValueChanged="NumericUpDown_ValueChanged" Margin="0,52,104,112" Value="{Binding Path=AlarmTime.Minute}" Step="1" MaxValue="59" MinValue="0" HorizontalAlignment="Right"></numeric:NumericUpDown>-->
    </Grid>
</UserControl>
